package dao

import (
	"gin-ranking/api/lock/entity"
	"gin-ranking/common/result"
	"gin-ranking/pkg/db"
)

type NbCommandRecordV2Dao struct{}

// QueryCountById 根据主键查询总数
func (NbCommandRecordV2Dao) QueryCountById(id string) (count int64) {
	err := db.DB.Model(&entity.LockPrivate{}).Where("lockid = ?", id).Count(&count).Error
	if err != nil {
		panic(result.FailMag(err.Error()))
	}
	return count
}
